package com.example.springblog.mapper;

import com.example.springblog.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    //1,根据用户名查询用户信息。
    @Select("select * from user where user_name=#{userName}")
    UserInfo selectUserByName(String userName);

    //2，根据用户ID查询用户信息。
    @Select("select * from user where id=#{id}")
    UserInfo selectUserById(Integer id);

}
